package cn.lizemin.feignclients;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author lzm
 * @version 1.0
 * @description: 调用HYSTRIX服务
 * @date 2022/3/8 14:33
 */
@FeignClient(value = "HYSTRIX",fallback = HystrixClientFallBack.class)  //fallback: 这个属性用来指定当前调用服务不可用时,默认的备选处理
public interface HystrixClient {

    @GetMapping("/demo")
    String demo(@RequestParam("id") Integer id);
}
